function Router() {
	this.paths = {};
	this.curPath = '';
}
Router.prototype = {
	path : function(str, callback) {
		var func = callback || function() {
		};
		this.paths[str] = func;
	},
	refresh : function() {
		this.curPath = location.hash.slice(1) || '/home'
		this.paths[this.curPath]()
	},
	init : function() {
		window.addEventListener('load', this.refresh.bind(this), false)
		window.addEventListener('hashchange', this.refresh.bind(this), false)
	}
}

var r = new Router();
r.path('/customerManager', function() {
	var templateUrl = "views/customer_manager.html";
	$("#main-content").load(templateUrl);
})

r.init()
